package hcn.protocol.phr.healthrecord;

import com.fasterxml.jackson.annotation.JsonIgnore;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlRootElement;
import java.io.Serializable;
import java.util.List;

/**
 * 健康档案:门诊记录 返回数据
 *
 * @author lidq
 */
@XmlRootElement(name = "response")
@XmlAccessorType(XmlAccessType.FIELD)
public class ClinicRecordsResultBean implements Serializable {

    private static final long serialVersionUID = 911589039783049493L;

    private Integer code;

    private String msg;

    private Body body;

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Body getBody() {
        return body;
    }

    public void setBody(Body body) {
        this.body = body;
    }

    @XmlAccessorType(XmlAccessType.FIELD)
    public static class Body {
        private String mpiid;

        @XmlElementWrapper(name = "items")
        private List<YearData> yearData;

        public String getMpiid() {
            return mpiid;
        }

        public void setMpiid(String mpiid) {
            this.mpiid = mpiid;
        }

        public List<YearData> getYearData() {
            return yearData;
        }

        public void setYearData(List<YearData> yearData) {
            this.yearData = yearData;
        }
    }

    @XmlAccessorType(XmlAccessType.FIELD)
    public static class YearData {
        private String mpiid;
        // 年份
        private String year;
        // 总条数
        @JsonIgnore
        private Integer total;
        // 是否有更多
        private Boolean hasmore;
        // 门诊记录
        @XmlElementWrapper(name = "recordList")
        private List<Record> record;

        public String getMpiid() {
            return mpiid;
        }

        public void setMpiid(String mpiid) {
            this.mpiid = mpiid;
        }

        public String getYear() {
            return year;
        }

        public void setYear(String year) {
            this.year = year;
        }

        public Integer getTotal() {
            return total;
        }

        public void setTotal(Integer total) {
            this.total = total;
        }

        public Boolean getHasmore() {
            return hasmore;
        }

        public void setHasmore(Boolean hasmore) {
            this.hasmore = hasmore;
        }

        public List<Record> getRecord() {
            return record;
        }

        public void setRecord(List<Record> record) {
            this.record = record;
        }
    }

    @XmlAccessorType(XmlAccessType.FIELD)
    public static class Record {
        // 记录标识
        private String dcid;
        // 诊断名称
        private String title;
        // 医院code
        private String orgCode;
        // 医院名称
        private String orgName;
        // 科室code
        private String deptCode;
        // 科室名称
        private String deptName;
        // 医生code
        private String doctorCode;
        // 医生名称
        private String doctorName;
        // 门诊时间 yyyy-MM-dd
        private String optDate;
        // 就诊流水号
        private String jzlsh;

        public String getDcid() {
            return dcid;
        }

        public void setDcid(String dcid) {
            this.dcid = dcid;
        }

        public String getTitle() {
            return title;
        }

        public void setTitle(String title) {
            this.title = title;
        }

        public String getOrgCode() {
            return orgCode;
        }

        public void setOrgCode(String orgCode) {
            this.orgCode = orgCode;
        }

        public String getOrgName() {
            return orgName;
        }

        public void setOrgName(String orgName) {
            this.orgName = orgName;
        }

        public String getDeptCode() {
            return deptCode;
        }

        public void setDeptCode(String deptCode) {
            this.deptCode = deptCode;
        }

        public String getDeptName() {
            return deptName;
        }

        public void setDeptName(String deptName) {
            this.deptName = deptName;
        }

        public String getDoctorCode() {
            return doctorCode;
        }

        public void setDoctorCode(String doctorCode) {
            this.doctorCode = doctorCode;
        }

        public String getDoctorName() {
            return doctorName;
        }

        public void setDoctorName(String doctorName) {
            this.doctorName = doctorName;
        }

        public String getOptDate() {
            return optDate;
        }

        public void setOptDate(String optDate) {
            this.optDate = optDate;
        }

        public String getJzlsh() {
            return jzlsh;
        }

        public void setJzlsh(String jzlsh) {
            this.jzlsh = jzlsh;
        }

    }
}
